"""\
Class ScreenShotEventHandle provides Screen-Shot handle.
"""

from direct.showbase.DirectObject import DirectObject

class ScreenShotEventHandle(DirectObject):
    def __init__(self, keyEventName, prefix = "ss"):
        self.accept(keyEventName, self.ScreenShotHandle)
        self.prefix = prefix

    def ScreenShotHandle(self):
        base.screenshot(self.prefix)
